/**@file audict.h
 * @brief 审核通配分词 结果，宏定义
 * @author robble
*/
#ifndef __HBCWS_AUDIT_H__
#define __HBCWS_AUDIT_H__

#include <ctype.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <vector>
#include <map>
#include <vector>
#include <string>

#include "scws.h"

#ifdef __cplusplus
extern "C"
{
#endif

#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

using namespace std;

enum {CHR_PRINT, CHR_NUMBER, CHR_LETTER, CHR_HZ, CHR_END, CHR_WILDCARD};

typedef struct _match_str {
    unsigned short int len;
    unsigned short int flag;
    string pattern;
}match_str;

typedef vector <match_str > MATCH_VEC; 	
typedef MATCH_VEC::iterator MATCH_ITER;

typedef map <string,  MATCH_VEC  > IGNORE_MAP;
typedef IGNORE_MAP::iterator IGNORE_ITER;
typedef IGNORE_MAP::const_iterator CONST_IGNORE_ITER;



int init_dict(const char *datapath);
int load_dict(scws_t s, const char *dir);
IGNORE_MAP * find_map(const char *dict); 


extern map <string, IGNORE_MAP > g_res_map;

#ifdef __cplusplus
}
#endif /*endif  }*/

#endif /* #ifndef __HBCWS_AUDIT_H__*/

